<?php $this->load->view('tourism/layout/header') ?>
<header class="intro-header am-cf">
    <a href="<?php echo site_url('tourism/tourismprovider/grid') ?>">
        <div class="return am-fl"><i class="iconfont icon-zuojiantou"></i></div>
    </a>
    <div class="title am-fl">新闻动态</div>
</header>
<div class="news-content-list widthMax">
    <?php if ($headline) : ?>
        <ul>
            <?php foreach ($headline as $key => $item) : ?>
            <?php
                $pattern="/<[img|IMG].*?src=[\'|\"](.*?(?:[\.gif|\.jpg|\.png]))[\'|\"].*?[\/]?>/";
                $status = preg_match_all($pattern, $item->content,$match);
            ?>
            <li>
                <a href="<?php echo site_url('tourism/tourismprovider/newsInfo/'.$item->id); ?>" class="content-info flex">
                    <?php if ($status) : ?>
                    <div class="left-image">
                        <?php echo $match[0][0];?>
                        <!-- <img src=""> -->
                    </div>
                    <?php endif; ?>
                    <div class="right-content flex-1">
                        <div class="title"><?php echo $item->title ?></div>
                        <div class="instr"><?php echo strip_tags($item->content); ?></div>
                        <div class="time"><?php echo $item->created_at ?></div>
                    </div>
                </a>
            </li>
            <?php endforeach; ?>
        </ul>
    <?php else : ?>
        <div class="none">暂无新闻</div>
    <?php endif; ?>
</div>
</body>
</html>